import request from '@/utils/request'

export function login(data) {
  return request({
    url: '/login',
    method: 'post',
    data
  })
}

export function getInfo() {
  return request({
    url: '/getInfo',
    method: 'get',
    
  })
}

export function logout() {
  return request({
    url: '/logout',
    method: 'post'
  })
}
export function updateInfo(data){
  return request({
    url:'/updateInfo',
    method:'post',
    data:data
  })
}
export function updatePwd(data){
  return request({
    url:'/updatePwd',
    method:'post',
    data:data
  })
}
// 查询自己的预约练车

export function practiceCar(nickname) {
  return request({
    url: `/user/getPractice?nickname=${nickname}`,
    method: 'get',
    
  })
}
export function Myexam(nickname) {
  return request({
    url: `/user/getExam?nickname=${nickname}`,
    method: 'get',
    
  })
}
